Don't free trash pointer if no valid points read from Garmin.
authorrobertl <robertl>
Wed, 9 Jan 2008 04:01:10 +0000 (04:01 +0000)
committerrobertl <robertl>
Wed, 9 Jan 2008 04:01:10 +0000 (04:01 +0000)
garmin.c

index a901c9bef11970b81f753bad4b45c9297889d72c..dcd8fbe9171fe1957df9d61ba0c6ebba74bdd005 100644 (file)
--- a/garmin.c
+++ b/garmin.c
@@ -239,7 +239,7 @@ static void
 waypt_read(void)
 {
        int i,n;
-       GPS_PWay *way;
+       GPS_PWay *way = NULL;
 
        if (getposn) {
                waypoint *wpt = waypt_new();